
import 'package:mobile_app.core/core/domain/entities/learning_content/lexical_item/lexical_item.dart';

abstract class IsProgressResetCardActionReasonable {
  bool call({
    required LexicalItem lexicalItem,
  });
}

class IsProgressResetCardActionReasonableImpl implements IsProgressResetCardActionReasonable {
  const IsProgressResetCardActionReasonableImpl();

  @override
  bool call({
    required LexicalItem lexicalItem,
  }) {
    final lexicalItemProgress = lexicalItem.progress;

    return lexicalItemProgress != null &&
        !lexicalItem.excluded &&
        !lexicalItem.isContainedInLearningQueue;
  }
}
